﻿using DevExpress.XtraEditors;
using DevExpress.XtraReports.UI;
using DevTeam;
using System;
using System.Windows.Forms;

namespace ConfExpert.Forms.Depo
{
    public partial class KartelaEtiketi : XPopupForm
    {
        public KartelaEtiketi(int customerId, string productIds)
        {
            InitializeComponent();
            ProductIds = productIds;
            CustomerId = customerId;
        }
        string ProductIds;
        int CustomerId;

        private void KartelaEtiketi_Load(object sender, EventArgs e)
        {
            
        }

        private void btnPreview_Click(object sender, EventArgs e)
        {
            int bosEtiket = txtEmptyLabel.Text.ToInt();
            if (bosEtiket > 35)
            {
                XtraMessageBox.Show("Bir sayfada 35'dan fazla boş etiket olamaz!", "Critical");
                return;
            }
            Rapor.KartelaEtiketleri numune = new Rapor.KartelaEtiketleri(CustomerId, ProductIds, bosEtiket, cbCons.Checked,cbBarkod.Checked);
            numune.ShowPreview();
            this.DialogResult = DialogResult.OK;
        }
    }
}